import request from '@/utils/request'

// 查询党支架构列表
export function listNewDept(query) {
  return request({
    url: '/commerce/newDept/list',
    method: 'get',
    params: query
  })
}

// 查询党支架构详细
export function getNewDept(deptId) {
  return request({
    url: '/commerce/newDept/' + deptId,
    method: 'get'
  })
}

// 新增党支架构
export function addNewDept(data) {
  return request({
    url: '/commerce/newDept',
    method: 'post',
    data: data
  })
}

// 修改党支架构
export function updateNewDept(data) {
  return request({
    url: '/commerce/newDept',
    method: 'put',
    data: data
  })
}

// 删除党支架构
export function delNewDept(deptId) {
  return request({
    url: '/commerce/newDept/' + deptId,
    method: 'delete'
  })
}
